import request from '#/utils/requestAbort';

// 使用新服务的交易单元，黑龙江、陕西
export const useNewService = ['PDBLJ', 'PXBSX'];

export async function getStationLevelThree(params) {
  return request('/power/station/getStationLevelThree', {
    method: 'POST',
    data: params,
  });
}

export async function getSettlementClassDetailType(marketId) {
  const url = `${
    useNewService.includes(marketId) ? '/private-business' : '/clearing-settlement'
  }/electricityCostSortManagement/listTransactionAttributes/${marketId}`;
  return request(url, {
    method: 'GET',
  });
}

export async function getSettlementClassDetail(params) {
  const { marketId } = params;
  const url = `${
    useNewService.includes(marketId) ? '/private-business' : '/clearing-settlement'
  }/SettlementCategoryDetails/listSettlementClassDetail`;
  return request(url, {
    method: 'POST',
    data: params,
  });
}
// 省份-交易中心-场站（数据权限）
export async function queryMarketList(menuCode) {
  return request(`/power/dataPower/common/${menuCode}/t_station`, {
    method: 'GET',
  });
}
